<template>
  <div>
      <mycate :data="data" />
  </div>
</template>

<script>
import mycate from './mycate.vue'
export default {
    data(){
        return{
            data:{},

        }
    },
    components:{
        mycate
    },
    mounted(){
        this.get_data()
    },
    methods:{
        get_data:function(){
            this.axios.get('http://localhost:8000/get_cate/').then((res)=>{
                console.log(res)

                var mytree={'id':0,name:''}
                mytree['children']=res.data
                this.data=mytree
            })
        }
    }

}
</script>

<style>

</style>